﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
  <class name="Neuparts.Ordering.Entities.Order, Neuparts.Ordering.Entities" table="Orders" lazy="false">
    
    <id name="Id" column="ID">
      <generator class="identity" />
    </id>

    <property name="OrderDate" column="OrderDate" />
    <property name="IsShipped" column="IsShipped" />
    <many-to-one name="Customer" column="CustomerID" class="Neuparts.Ordering.Entities.Customer, Neuparts.Ordering.Entities" not-null="true" />
    
  </class>

  <class name="Neuparts.Ordering.Entities.OrderDetail, Neuparts.Ordering.Entities" table="OrderDetails" lazy="false">
    
    <id name="Id" column="ID">
      <generator class="identity" />
    </id>

    <property name="OrderId" column="OrderID" />
    <property name="Quantity" column="Quantity" />
    <property name="ItemId" column="ItemID" />
    
  </class>
   
</hibernate-mapping>